home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1999 January - Disc 2 / Macworld (1999-01) (Disk 2).dmg / Serious Demos / Symbolic Composer 4.2 / Environment / Projects / Examples / More Examples / Humanizer test < prev    next >
Text File  |  1998-10-26  |  1KB  |  51 lines

  1. ; This example shows both def-duration and def-expression.
  2. ; (legato 100 10 0.4) accepts larger than 100% values. This makes
  3. ; it easy to create overlaps without usind durations. If you set
  4. ; legato to 120 percent with 5 percent variation then each note
  5. ; generated will overlap the next. Overlaps are important when
  6. ; creating natural sounding pianos and string sections.
  7.  
  8. (def-symbol
  9.    piano1 '(a b c d e f g h i j k l m n)
  10.    piano2 (reverse (symbol-of piano1))
  11. )
  12.  
  13. (def-length
  14.    piano1 '((1/16) (1/8t))
  15.    piano2 '((1/16) (1/8t))
  16. )
  17.  
  18. (def-duration
  19.    piano1 '(1/2 1/4 1/8)
  20.    piano2 '(1/4 1/8 1/2)
  21. )
  22.  
  23. (def-tonality
  24.    piano1 (activate-tonality (pentamajor c 4))
  25.    piano2 (activate-tonality (pentamajor c 5))
  26. )
  27.  
  28. (def-zone
  29.    piano1 '(2/1 2/1 1/1 1/1)
  30.    piano2 '(2/1 2/1 1/1 1/1)
  31. )
  32.  
  33. (def-channel
  34.    piano1 1
  35.    piano2 2
  36. )
  37.  
  38. (def-expression
  39.    default ((humanize -2 2 0.4) 
  40.             (velocity 20 0.4) 
  41.             (legato 100 30 0.4)) 
  42. )
  43.  
  44. (def-tempo 120)
  45.  
  46. (midiport :printer)
  47.  
  48. (compile-instrument-p "ccl;output:" "humanized overlaps"
  49.    piano1
  50.    piano2
  51. )